package br.com.salaodebeleza.persistence;

import java.util.List;

import javax.inject.Inject;

import org.slf4j.Logger;

import br.com.salaodebeleza.domain.TbMenu;
import br.gov.frameworkdemoiselle.stereotype.PersistenceController;
import br.gov.frameworkdemoiselle.template.JPACrud;

@PersistenceController
public class TbMenuDAO extends JPACrud<TbMenu, Long> {

	private static final long serialVersionUID = 1L;
	
	@Inject
	@SuppressWarnings("unused")
	private Logger logger;
	
	public List<TbMenu> buscarMenusFilhos(TbMenu menu){
		String jpql = "select a from TbMenu a where a.tbMenu = "+ menu.getId() ;
		return findByJPQL(jpql);
	}
}
